﻿using System;
using System.Windows;
using MyFloridaHouse.libSvCommonUtilities;
using MyFloridaHouse.ServiceConn.DistrBldrSvcRef;

namespace MyFloridaHouse.libSvOpenDistricts.DataService
{
    public partial class ServiceDAL
    {
        public void GetDistrictShape(int iDistrictID, string iShapeUogIDList, System.EventHandler<GetDistrictShapeCompletedEventArgs> completedHandler)
        {
            try
            {
                //MyDistrictBuilderServiceClient proxy = new MyDistrictBuilderServiceClient(myRelativeBinding, myRelativeCensusDataServiceAddress);
				var proxy = new DistrBldrClient(_relativeBindingName);
                proxy.GetDistrictShapeCompleted += completedHandler;
                proxy.GetDistrictShapeAsync(CompressionManager.Compress(iShapeUogIDList), iDistrictID);
                getDistrictShapeRequestCount++;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
    }
}
